<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>宠物知识|蜗牛宠物领养平台</title>

    <link rel="shortcut icon" th:href="@{/asserts/images/favicon.ico}" type="image/x-icon"/>
    <!-- Bootstrap的css -->
    <link rel="stylesheet" th:href="@{/asserts/bootstrap3.4.1/css/bootstrap.min.css}">
    <!-- jQuery本地-->
    <script th:src="@{/asserts/js/jQuery-3.6.0.js}"></script>
    <!-- 加载本地js -->
    <script th:src="@{/asserts/bootstrap3.4.1/js/bootstrap.min.js}"></script>
    <!-- 加载common.css -->
    <link rel="stylesheet" th:href="@{/asserts/css/common.css}"/>
    <!-- 加载页头页尾css -->
    <link rel="stylesheet" th:href="@{/asserts/css/top.css}"/>
    <link rel="stylesheet" th:href="@{/asserts/css/foot.css}"/>
    <!-- 加载页头页尾js -->
    <script th:src="@{/asserts/js/top.js}"></script>

    <style>
        .li-article > div {
            margin-bottom: 20px;
        }


    </style>

</head>
<body>
<!-- 页头 -->
<nav th:replace="nav::headerBar"></nav>
<div class="container">

    <div style="height: 100px"><h1>宠物文章详情</h1></div>

    <div th:if="${petArticle!=null}">
        <h1 class="text-center" th:text="${petArticle.title}"></h1>
    </div>

    <div>
        <div class="text-right">
            <label>访问量 : </label><span th:text="${petArticle.views}"></span>&nbsp;&nbsp;&nbsp;&nbsp;
            <span th:text="${#dates.format(petArticle.updateTime, 'yyyy-MM-dd')}"></span>
        </div>
    </div>

    <!--    <div th:text="${petArticle.body}">-->
    <div th:utext="*{petArticle.body}">

    </div>
</div>
<hr style="margin: 40px; border: 1px solid;">

<!-- 页尾 -->
<footer th:replace="nav::footBar"></footer>

<script>
    function go(now) {
        now = now === 0 ? 1 : now;
        let url = '[[@{/petArticle/list}]]' + '?pageNum=' + now;
        window.location.href = url;
    }


</script>
</body>
</html>